﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Code.Models;

namespace RuiJing.Web.Models.ProductsModels
{
    public class IndexModel
    {
        public IndexModel()
        {
            l = Language.En;
        }
        public Language? l { get; set; }
        /// <summary>
        /// 产品类型
        /// </summary>
        public int? A { get; set; }
        /// <summary>
        /// 分页ID
        /// </summary>
        public int? B { get; set; }
        /// <summary>
        /// 分页数
        /// </summary>
        public int? C { get; set; }

        public bool? D { get; set; }

        public int SumCount { get; set; }

        public IndexSerchModel Serch { get; set; }

        public IEnumerable<ProductItem> Products { get; set; }
        public List<TypeItem> Parents { get; set; }
        public List<TypeItem> Childs { get; set; }
    }

    public class IndexSerchModel
    {
        public string Number { get; set; }
    }

    public class DetailModel
    {
        public ProductItem Item { get; set; }
        public NameValueItem<string, string>[] Disc_En { get; set; }
        public NameValueItem<string, string>[] Disc_Ch { get; set; }

        public string TypeName_En { get; set; }
        public string TypeName_Ch { get; set; }
        public PictureItem[] Pictures { get; set; }
                

        public IEnumerable<ProductPictureType> PictureTypes { get; set; }
    }

    public class ProductItem
    {
        public long ID { get; set; }
        public string Number { get; set; }
        public string Name_En { get; set; }
        public string Name_Ch { get; set; }
        public string Dec_En { get; set; }
        public string Dec_Ch { get; set; }
        public string DefaultPic { get; set; }
        public int TypeID { get; set; }
        public string TypePath { get; set; }
        public int ClickCount { get; set; }
    }

    public class PictureItem
    {
        public long ID { get; set; }
        public string FileName { get; set; }
        public int TypeID { get; set; }
    }

    public class TypeItem
    {
        public int ID { get; set; }
        public int? ParentID { get; set; }
        public string Parents { get; set; }
        public string Name_En { get; set; }
        public string Name_Ch { get; set; }
        public int ProductCount { get; set; }
    }
}